package mafiagame;

public class Mark {
	public enum MarkType  
	{ 
		KILL, 
		EXECUTION, 
		SAVE_KILL, 
		SAVE_EXECUTION, 
		INVESTIGATE_ROLE, 
		INVESTIGATE_ALIGNMENT, 
		REMOVE_VOTE, 
		BLOCK,
		REDIRECT_KILL,
		REDIRECT_SAVE,
		DESTINY_BOND,
		GIVE_ROLE,
		GIVE_WILL,
		DELAYED_KILL
	};
	public enum MarkScope { NIGHT, DAY, BOTH, PERMANENT};
	
	public Mark(Mark other)
	{
		type = other.type;
		source = other.source;
		scope = other.scope;
		duration = other.duration;
		isBlockable = other.isBlockable;
		isRedirectable = other.isRedirectable;
		processed = false;
		isSaveable = other.isSaveable;
		redirectTarget = other.redirectTarget;
		dependentTarget = other.dependentTarget;
		givenRole = other.givenRole;
	}
	
	public Mark()
	{
		
	}

	public MarkType type;
	public Player source;
	
	public MarkScope scope;
	public int duration; // Number of scopes to which this mark applies
	// IE, a mark that lasts two nights would be Scope NIGHT, 2
	// a mark that lasts one night, the next day, and the next night would be scope ALWAYS, 3
	
	public boolean isBlockable;
	public boolean isRedirectable;
	
	public boolean processed;
	
	// Kill info
	public boolean isSaveable;
	
	// Redirects
	public Player redirectTarget;
	
	// Dependent
	public Player dependentTarget;
	
	// Give Role
	public Role givenRole;
	
	//Contents of a will
	public String willContents;
	
	public String toString()
	{
		String s = "";
		s = s + "type:" + type + ", ";
		s = s + "source:" + ((source != null) ? source.username : "") + ", ";
		s = s + "scope:" + scope + ", ";
		s = s + "duration:" + duration + ", ";
		s = s + "isBlockable:" + isBlockable + ", ";
		s = s + "isRedirectable:" + isRedirectable + ", ";
		s = s + "processed:" + processed + ", ";
		s = s + "isSaveable:" + isSaveable + ", ";
		s = s + "dependentTarget:" + ((dependentTarget != null) ? dependentTarget.username : "") + ", ";
		s = s + "redirectTarget:" + ((redirectTarget != null) ? redirectTarget.username : "") + ", ";
		s = s + "givenRole:" + ((givenRole != null) ? givenRole.getName() : "") + ", ";
		return s;
	}
};